export const rules = {
    ctgName: [
        { required: true, message: '请输入分类名称', trigger: 'blur' },
        { min: 2, max: 10, message: '分类名称长度2-10位', trigger: 'blur' },
    ],
    ctgCode: [
        { required: true, message: '请输入分类编码', trigger: 'blur' },
        { min: 2, max: 20, message: '编码长度2-20位', trigger: 'blur' },
        {pattern:new RegExp(/^[0-9a-zA-Z]{2,}$/,'g'),message:"编码只允许包含字母与数字",trigger: 'blur' }
    ],
}